home *** CD-ROM | disk | FTP | other *** search
- JDBC-ODBC Version 1.0105 Release Notes
-
-
- Version 1.0105 Notes
- --------------------
- With this version the package name for the bridge has been changed to
- sun.jdbc.odbc (it was previously jdbc.odbc). This was done in
- preparation for its inclusion in the forthcoming JDK 1.1 release.
-
- Be sure to remove any previous versions of the bridge that may still be
- installed. This package name change also changes the path name for the
- JdbcOdbc.dll file: be sure to change your library path to
- jdbc-odbc/sun/jdbc/odbc.
-
- The Win32 JdbcOdbc.dll is now dynamically linked and requires
- msvcrt.dll and msvcrtd.dll for the normal and debug versions
- respectively.
-
-
- What is the JDBC-ODBC Bridge?
- -----------------------------
- The JDBC-ODBC Bridge is a JDBC driver which implements JDBC operations
- by translating them into ODBC operations. To ODBC it appears as a
- normal application program.
-
- The Bridge implements JDBC for any database for which an ODBC driver is
- available (for the client environments noted below.)
-
- The Bridge is implemented as the sun.jdbc.odbc Java package and contains a
- native library used to access ODBC.
-
- The Bridge is a joint development of Intersolv and JavaSoft.
-
-
- Who to contact?
- ---------------
- You can contact us at jdbc-odbc@wombat.eng.sun.com
-
-
- What version of JDBC is supported?
- ----------------------------------
- The bridge supports JDBC version 1.00.
-
-
- What version of ODBC is supported?
- ----------------------------------
- The bridge supports ODBC 2.x
-
-
- What operating systems are supported?
- -------------------------------------
- The bridge supports Solaris/Sparc 2.4 or 2.5, WinNT/Intel 3.51 and Win95.
-
- The Solaris version is provided as a compressed tar file,
- jdbc-odbc.10000.tar.Z.
-
- The WinNT and Win95 version is provided as zip file, jdbc-odbc.10000.zip.
-
-
- The Bridge Implementation
- -------------------------
- The Bridge is implemented in Java and uses Java native methods to call
- ODBC. The only difference between the platform specific versions is the
- native library.
-
-
- Installation
- ------------
- See the Java web page for info on installing the JDK. You must also
- install JDBC which can be downloaded from
- http://splash.javasoft.com/jdbc/
-
- See your ODBC driver vendor for info on installing and configuring
- ODBC. No special configuration is required for the Bridge.
-
- See your database vendor for installation and client configuration
- info.
-
- Normally, JDBC classes are installed in the jdbc/classes/java/sql
- directory.
-
- The Bridge will install its classes in jdbc-odbc/classes/sun/jdbc/odbc.
-
- Be sure to add both the jdbc/classes and the jdbc-odbc/classes
- directories to your Java CLASSPATH environment variable.
-
- For NT and Win95 use a version of unzip that preserves long file names
- and use the -d flag. The msvcrt40.dll is included.
-
- For Solaris uncompress and extract (tar xvf) the files.
-
- On Solaris you need to add the directory containing libJdbcOdbc.so to
- your LD_LIBRARY_PATH. The libJdbcOdbc.so shared library has the following dependencies:
-
- libodbcinst.so.1
- libodbc.so.1
- libm.so.1
- libc.so.1
- libdl.so.1
-
- Some ODBC driver managers name their libs libodbcinst.so and
- libodbc.so. These require symbolic links to the names above.
-
- On WinNT and Win95 you need to add the directory containing
- jdbcodbc.dll to your PATH. The jdbcodbc dll has the following
- dependencies:
-
- kernel32.dll
- odbc32.dll
- odbccp32.dll
- msvcrt40.dll - this is included with the bridge
-
- In addition to the Bridge class files, a sample JDBC app,
- simpleselect.java, that uses the Bridge is provided. You will need to
- edit its data source name, UID, PWD and table name.
-
-
- Using the Bridge
- ----------------
-
- The Bridge is used by opening a JDBC connection using a URL with the
- odbc subprotocol. See below for URL examples.
-
- Prior to connecting, the bridge driver class, sun.jdbc.odbc.JdbcOdbcDriver,
- must either be added to the java.lang.System property named
- 'jdbc.drivers' or it must be explicitly loaded using the Java class
- loader. Explicit loading is done by:
-
- Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
-
- When loaded, the ODBC driver (like all good JDBC drivers) creates an
- instance of itself and registers this with the JDBC driver manager.
-
-
- Using the Bridge from an Applet
- -------------------------------
- There have been a number of questions about the use of JDBC from
- applets and, in particular, the use of the JDBC-ODBC Bridge driver from
- applets.
-
- JDBC is designed to support both intranet and web access to databases.
- It also is designed to support database access from servers written in
- Java. The specific nature of access provided depends on the
- capabilities of the JDBC driver your using.
-
- The JDBC spec describes several database access scenarios. It is likely
- that there will soon be drivers supporting these scenarios as well as
- other scenarios we have not even thought of.
-
- JavaSoft provides the JDBC-ODBC Bridge driver which allows JDBC
- developers to tap into the existing database access facilities provided
- by the ODBC API and the drivers that support it. The Bridge driver does
- have a few limitations.
-
- First, there are the limitations of ODBC itself. The ODBC Driver
- Manager, ODBC driver and, in most cases, the DBMS client library all
- execute in the same program as JDBC and the JDBC-ODBC Bridge. Getting
- this to happen typically involves some complicated ODBC and DBMS
- installation and configuration. Most ODBC drivers do not support
- database access via the Web although its likely that someone is
- thinking up a solution for this.
-
- Second, the Bridge accesses ODBC via Java native C calls. This requires
- a native library that is platform specific and must be installed
- manually on each Bridge client.
-
- Third, the Bridge cannot tell to which TCP/IP address it is connecting
- to. This means that it must deny service to all untrusted Java code. It
- defines trusted code as either code with no security manager or code
- whose security manager allows file writes. Some browsers provide a
- mechanism for locally installing trusted applets and some do not. All
- browsers treat downloaded applets as untrusted. This will change with
- the introduction of signed applets later this year.
-
- So, for these reasons it is not practical to use the Bridge for Web
- database access.
-
- The Bridge can be used for intranet access. This requires that each
- client have ODBC, the Bridge native library, the Bridge itself, and
- JDBC installed (JDBC will be added to the next JDK release; the Bridge
- will likely be added as well.) This will work from a Java application
- and from trusted applets. Depending on the security restrictions
- imposed by your browser you may or may not be able treat locally
- installed applets as trusted.
-
-
- Tested Configurations
- ---------------------
- From Solaris, we have used the Bridge to access Oracle 7.1.6 and Sybase
- Version 10 running on Solaris.
-
- From NT, we have used the Bridge to access SQL Server 6.x.
-
-
- ODBC Drivers Known to Work with the Bridge
- ------------------------------------------
- Visigenic provides ODBC drivers which have been tested with the the
- Bridge. Drivers are available for Oracle, Sybase, Informix, Microsoft
- SQL Server, and Ingres. To purchase the ODBC DriverSet 2.0 please
- contact Visigenic sales at 415-312-7197, or visit the web site
- www.visigenic.com.
-
- The INTERSOLV ODBC driver suite should be completely compatible with
- the JDBC-ODBC bridge. The following drivers have successfully passed a
- minimal test suite: Oracle, xBASE, Sybase (Windows NT/95 only),
- Microsoft SQL-Server, and Informix. To evaluate or purchase INTERSOLV
- ODBC drivers, please contact INTERSOLV DataDirect Sales at 1
- 800-547-4000 Option 2 or via the World Wide Web at
- http:\\www.intersolv.com.
-
- The MS SQL Server driver has also been used successfully on NT.
-
- Many other ODBC drivers will likely work.
-
-
- ODBC Driver Incompatibilities
- -----------------------------
- On Solaris, we have found that the Sybase ctlib based drivers use ctlib
- in a way that causes a signal handling conflict between the Java VM and
- ctlib. This is likely not a problem on NT due to differences in the NT
- Java VM but this has not been verified.
-
- Some ODBC drivers only allow a single ResultSet to be active per
- Connection.
-
-
- What is the JDBC URL supported by the Bridge?
- ---------------------------------------------
- The Bridge driver uses the odbc sub protocol. Url's for this
- subprotocol are of the form:
-
- jdbc:odbc:<data-source-name>[;<attribute-name>=<attribute-value>]*
-
- For example:
-
- jdbc:odbc:sybase
-
- jdbc:odbc:mydb;UID=me;PWD=secret
-
- jdbc:odbc:ora123;Cachesize=300
-
-
- Some Details About Versioning
- -----------------------------
- The JDBC API has methods for returning the driver name and version.
- getDriverName and getDriverVersion (in DatabaseMetaData) will return the
- following for the JDBC-ODBC Bridge:
-
- getDriverName: JDBC-ODBC Bridge (<odbc-driver-name>)
-
-
- getDriverVersion: 0.7303 (<odbc-driver-version>)
-
- The Bridge version number breaks down as:
-
- 0.7303
- | | |____ 03 - Current Bridge version for this
- | | version of DriverManager
- | |______ 73 - Supported DriverManager minor
- | version
- |________ 0 - Supported DriverManager major
- version
-
-
- Debugging
- ---------
-
- The Bridge provides extensive tracing when DriverManager tracing is
- enabled. The following line of code enables tracing and sends it to
- standard out:
-
- java.sql.DriverManager.setLogStream(java.lang.System.out);
-
-
- General Notes
- -------------
- The Bridge was compiled with JDK 1.0.2.
-
- The Bridge assumes that ODBC drivers are not reentrant. This means the
- Bridge must synchronize access to these drivers. The result is that the
- Bridge provides limited concurrency. This is a limitation of the
- Bridge; JDBC itself supports a high degree of concurrency and the JDBC
- drivers now being developed should significantly improve concurrent
- access.
-
-
-
-